﻿<MVVMBase:UserControlBase x:Class="EzDesk.DesktopClient.AppModule.View.ShortcutFunctionPanelView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:MVVMBase="clr-namespace:EzDesk.MVVMBase;assembly=EzDesk.MVVMBase" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"  Background="Transparent" 
            Height="54">
    <Grid >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <ListBox Grid.Column="0" Background="Transparent" HorizontalAlignment="Left" ItemsSource="{Binding ShortcutAppFunctionViewModelCollection}">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel  Orientation="Horizontal" Background="Transparent"></StackPanel>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Button ToolTip="{Binding Path=AppFunctionModel.Title}" Command="{Binding CallAppFunctionCommand}">
                        <Image Width="48" Source="{Binding Path=AppFunctionModel.IconUrl,Converter={StaticResource ImageCacherConverter}}"></Image>
                    </Button>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Button Grid.Column="1"  Width="48" Margin="3" TextBlock.Foreground="White" Command="{Binding MoreFunctionCommand}" HorizontalAlignment="Right">
            <Image HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="{StaticResource MoreFunction}"></Image>
        </Button>
    </Grid>
</MVVMBase:UserControlBase>
